﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VO;
namespace DAL
{
    class HoaDon_DAO:SqlDataProvider
    {
        #region[Customer_Insert]
        public bool Customer_Insert(HoaDon_OBJ _HoaDonOBJ)
        {
            using (SqlCommand dbCmd = new SqlCommand("sp_Ins_HoaDon", GetConnection()))
            {
                dbCmd.CommandType = CommandType.StoredProcedure;
                dbCmd.Parameters.Add(new SqlParameter("@MaKhachHang", _HoaDonOBJ.MaKhachHang));
                dbCmd.Parameters.Add(new SqlParameter("@TenDangNhap", _HoaDonOBJ.TenDangNhap));
                dbCmd.Parameters.Add(new SqlParameter("@TongTien",_HoaDonOBJ.TongTien));
                dbCmd.Parameters.Add(new SqlParameter("@KieuHoaDon", _HoaDonOBJ.KieuHoaDon));
                dbCmd.ExecuteNonQuery();
            }
            return true;
        }
        #endregion
    }
}
